View Javadoc

1   /*
2    * Copyright (c) 2004-2005, University Health Network.  All rights reserved. Distributed under the BSD 
3    * license (see http://opensource.org/licenses/bsd-license.php).
4    *  
5    * Created on 6-Dec-2004
6    */
7   package ca.uhn.cache;
8   
9   import java.util.Set;
10  
11  /***
12   * Represents a conjunction of <code>IQueryParam</code>s that scopes 
13   * a set of results.  
14   * 
15   * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
16   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
17   * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:08 $ by $Author: bryan_tripp $
18   */
19  public interface IQuery {
20      
21      /***
22       * @param theParam a parameter for a query, which is conjunctive with 
23       *      other parameters.  The parameter must be defined along a different
24       *      <code>IDimension</code> than existing parameters.
25       *      
26       * @precondition theParam != null
27       */
28      public void addParameter(IQueryParam theParam);
29  
30      /***
31       * @return all the <code>IQueryParam</code>s that make up this query
32       */
33      public Set getParameters();
34  
35      /***
36       * @param theDimension The specified dimension.
37       * @return The <code>IQueryParam</code> having the specified dimension, or <b>null</b>
38       *         if none has it.
39       */
40      public IQueryParam getParamByDimension( IDimension theDimension );
41      
42      /***
43       * @return <tt>true</tt> if this query contains no parameters.
44       */
45      public boolean isEmpty();
46      
47  }